$(function(){
    // 基于准备好的dom，初始化echarts图表
var myChart1 = echarts.init(document.getElementById('main1')); 
var option = {
    title: {
        // text: '折线图堆叠'
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        data:['完好率','高平完好率'],
        selectedMode : 'single'
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    toolbox: {
        feature: {
            // saveAsImage: {}
        }
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['00:00\n07-26','02:00\n07-26','04:00\n07-26','06:00\n07-26','08:00\n07-26','10:00\n07-26']
    },
    yAxis: {
        type: 'value'
    },
    series: [
        {
            name:'完好率',
            type:'line',
            stack: '总量',
            data:[0.8, 0.3, 0.9, 0.1, 0.6, 0.7]
        },
        {
            name:'高平完好率',
            type:'line',
            stack: '总量',
            data:[0.8, 0.3, 0.9, 0.1, 0.6, 0.7]
        }
    ]
};
myChart1.setOption(option);
    // 基于准备好的dom，初始化echarts图表
var myChart2 = echarts.init(document.getElementById('main2')); 
var option2 = {
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'value'
        }
    ],
    yAxis : [
        {
            type : 'category',
            axisTick : {show: false},
            data : ['100万高清','200万高清','高清','300万标清']
        }
    ],
    series : [
        {
            name:'利润',
            type:'bar',
            label: {
                normal: {
                    show: true,
                    position: 'right'
                }
            },
            data:[1180, 415, 375, 0]
        }
    ]
};

myChart2.setOption(option2);
    // 基于准备好的dom，初始化echarts图表
    var myChart3 = echarts.init(document.getElementById('main3')); 
var option3 = {
    color: ['#e0e0e0','#efefef'],
    angleAxis: {
    },
    radiusAxis: {
        type: 'category',
        // data: ['周一', '周二', '周三', '周四'],
        z: 10,
        borderColor: 'red'
    },
    polar: {
    },
    series: [{
        type: 'bar',
        data: [12, 0, 12, 0,12],
        coordinateSystem: 'polar',
        // name: 'A',
        stack: 'a'
    }, {
        type: 'bar',
        data: [0, 12, 0, 12,0],
        coordinateSystem: 'polar',
        // name: 'B',
        stack: 'a'
    }, {
        type: 'bar',
        data: [0, 0, 0, 0,0],
        coordinateSystem: 'polar',
        // name: 'C',
        stack: 'a'
    }],
    legend: {
        show: true,
        data: ['A', 'B', 'C']
    }
};myChart3.setOption(option3);


});
